from selenium import webdriver
from selenium.webdriver.support import expected_conditions as  EC
from selenium.webdriver.support.wait import WebDriverWait
import time


driver =webdriver.Chrome()
driver.get('https://www.baidu.com')

title=WebDriverWait(driver,5).until(EC.title_is('百度一下，你就知道'),message='标题一致')
print(title)
title2=WebDriverWait(driver,8,1).until_not(EC.title_is('百度一下,你就知道'),message='标题不一致')
print(title2)
print(11111)


time.sleep(2)
driver.quit()




